<!DOCTYPE html>
{% load staticfiles %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Result</title>
    <link href="{% static 'css/result.css' %}" rel="stylesheet">
    <link href="{% static 'css/bootstrap.css' %}" rel="stylesheet">
    <script src="{% static 'js/jquery-3.3.1.min.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/bootstrap.js' %}" type="text/javascript"></script>
</head>
<body>
<div class="search">
    <form method="post" action="{% url 'result' %}">
        {% csrf_token %}
        <div class="row">
            <div class="col-lg-6">
                <div class="input-group">
                    <input type="text" class="form-control" name="keyword" value="{{ keyword }}" aria-label="...">
                    <div class="input-group-btn">
                        <button type="button" class="btn btn-default dropdown-toggle"
                                data-toggle="dropdown" aria-haspopup="true"
                                aria-expanded="false">Go !
                        </button>
                        <ul class="dropdown-menu dropdown-menu-left">
                            <li><a href="#">Internet</a></li>
                            <li><a href="#">Article</a></li>
                            <li><a href="#">Question</a></li>
                            <li><a href="#">Position</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<div class="message">
    <div class="row">
        <div class="col-lg-6">
            <p class="message-text">总共为你找到{{ total_num }}条数据</p>
        </div>
    </div>
</div>
<div class="results">
    <div class="row">
        <div class="col-lg-6">
            <ul class="list-group">
                {% for hit in hit_list %}
                <li class="list-group-item result-item">
                    <div>
                        <h4><a href="{{ hit.url }}">{% autoescape off %}{{ hit.title }}{% endautoescape %}</a></h4>
                        <p><span>{{ hit.create_date }} - </span>{% autoescape off %}{{ hit.content }}{% endautoescape %}</p>
                        <a href="{{ hit.url }}">{{ hit.url }}</a>
                    </div>
                </li>
                {% endfor %}
            </ul>
        </div>
    </div>
</div>
<div class="pages">
    <nav aria-label="Page navigation">
        <ul class="pagination">
            <li><a href="#" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>
            <li><a href="#">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">4</a></li>
            <li><a href="#">5</a></li>
            <li><a href="#" aria-label="Next"><span aria-hidden="true">&raquo;</span></a></li>
        </ul>
    </nav>
</div>
</body>
</html>